import BasicConfig from "../utils/config";
/**
 * 流水数据类型
 * 1.订单收益(合伙人收益)
 * 2.提现到银行卡(提现收益)
 * 3.保证金缴纳
 * 4.保证金收益
 */
export const walletType = {
  /** 1.订单收益(合伙人收益) */
  order: 1,
  /** 2.提现到银行卡(提现收益) */
  take: 2,
  /** 3.保证金 */
  bondpay: 3,
  /** 4.保证金收益 */
  bondincome: 4,
};

export const walletTypeConfig = {
  [walletType.order]: {
    value: walletType.order,
    label: "订单收益",
    style: {
      color: "#111111",
    },
  },
  [walletType.take]: {
    value: walletType.take,
    label: "提现到银行卡",
    style: {
      color: "#111111",
    },
  },
  [walletType.bondpay]: {
    value: walletType.bondpay,
    label: "保证金缴纳",
    style: {
      color: "#111111",
    },
  },
  [walletType.bondincome]: {
    value: walletType.bondincome,
    label: "保证金收益",
    style: {
      color: "#111111",
    },
  },
};

/**
 * 金额增减类型
 * 1.增加
 * 2.减少
 */
export const priceWaveType = {
  /** 1.增加 */
  add: 1,
  /** 2.减少 */
  reduce: 2,
};

export const priceWaveTypeConfig = {
  [priceWaveType.add]: {
    value: priceWaveType.add,
    label: "增加",
    style: {
      color: "#00B07B",
    },
  },
  [priceWaveType.reduce]: {
    value: priceWaveType.reduce,
    label: "减少",
    style: {
      color: "#e61111",
    },
  },
};

/**
 * 金额提现状态
 * 0.待审核
 * 1.通过(银行处理中)
 * 2.到账
 * 3.失败
 */
export const priceWithdrawalStatus = {
  /** 0.待审核 */
  pending: 0,
  /** 1.通过(银行处理中) */
  pass: 1,
  /** 2.到账 */
  arrived: 2,
  /** 3.失败 */
  fail: 3,
};

export const priceWithdrawalStatusConfig = {
  [priceWithdrawalStatus.pending]: {
    value: priceWithdrawalStatus.pending,
    label: "待审核",
    style: {
      color: "#ff9900",
      width: "fit-content",
      padding: "6rpx 12rpx",
    },
  },
  [priceWithdrawalStatus.pass]: {
    value: priceWithdrawalStatus.pass,
    label: "银行处理中",
    style: {
      backgroundColor: " #ECFFFF",
      color: BasicConfig.MainColor,
      width: "fit-content",
      padding: "6rpx 12rpx",
    },
  },
  [priceWithdrawalStatus.arrived]: {
    value: priceWithdrawalStatus.arrived,
    label: "到账",
    style: {
      backgroundColor: " #ECFFFF",
      color: BasicConfig.MainColor,
      width: "fit-content",
      padding: "6rpx 12rpx",
    },
  },
  [priceWithdrawalStatus.fail]: {
    value: priceWithdrawalStatus.fail,
    label: "失败",
    style: {
      color: "#e61111",
      width: "fit-content",
      padding: "6rpx 12rpx",
    },
  },
};
